package com.atguigu.ssm.service.impl;

import com.atguigu.ssm.bean.User;
import com.atguigu.ssm.mapper.UserMapper;
import com.atguigu.ssm.service.UserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wk
 * @create 2021-06-07 19:57
 */
@Service
public class UseraServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public PageInfo<User> getList(int pageNum,int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<User> list = userMapper.selectByExample(null);
        PageInfo<User> pageInfo = new PageInfo<>(list,5);
        return pageInfo;
    }
}
